<< 接下來使用這個資料表 >>
SELECT food_name,sell_price
FROM food
Where sell_price IS NULL;
執行結果
SELECT food_name,sell_price
FROM food
Where sell_price IS NOT NULL;
執行結果
(缺點 : 篩選數量越多,SQL長度越長,越複雜)
SELECT food_name,buy_price
FROM food
WHERE buy_price = 5
OR buy_price = 10
OR buy_price = 15;
SELECT food_name,buy_price
FROM food
WHERE buy_price IN (5,10,15)
SELECT food_name,buy_price
FROM food
WHERE buy_price NOT IN (5,10,15)
執行結果